﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Caltech.Models
{
    [Bind(Exclude = "Salesman,Company")]
    public class PoModels : BaseModel
    {
        public int CompanyId { get; set; }

        public long ServiceCharges { get; set; }
        public float Tax { get; set; }
        public decimal GrandTotal { get; set; }
        public DateTime? CalibrationDate { get; set; }
        public string Note { get; set; }
        public string QuoteNumber { get; set; }
        public string PoNumber { get; set; }

        public float ExchangeRate { get; set; }

        public CompanyModel Company { get; set; }
        public SalesmanModel Salesman { get; set; }
        public IEnumerable<PoEquipmentModel> Items { get; set; }

    }

    public class PoSearchModel : BaseModel
    {
        public string CompanyName { get; set; }
        public string SalesmanName { get; set; }
        public DateTime? CalibrationDate { get; set; }
        public string PoNumber { get; set; }
        public int CompanyId { get; set; }
        public string SalesmanId { get; set; }
    }

    public class PoEquipmentModel : BaseModel
    {
        public string PoNumber { get; set; }
        public string Name { get; set; }
        public string Manufacturer { get; set; }
        public string SerialNumber { get; set; }
        public string ModelNumber { get; set; }
        public int EquipmentId { get; set; }
        public int Quantity { get; set; }
        public float UnitPrice { get; set; }
        public int? ServicePlace { get; set; }
    }
}